package icu.wdtt.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;

import java.util.List;

public class User {

    @ApiModelProperty("主键")
    private int uid;

    @ApiModelProperty("用户名")
    private String username;

    @ApiModelProperty("密码")
    @JsonIgnore
    private String password;

    @ApiModelProperty("邮箱")
    @JsonIgnore
    private String email;


    @ApiModelProperty("角色集合")
    private List<Role> roleList;
    @ApiModelProperty("文件集合")
    private List<Files> filesList;

    public User(int uid, String username, String password, String email, List<Role> roleList, List<Files> filesList) {
        this.uid = uid;
        this.username = username;
        this.password = password;
        this.email = email;
        this.roleList = roleList;
        this.filesList = filesList;
    }

    public User() {
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public int getUid() {
        return uid;
    }

    public void setUid(int uid) {
        this.uid = uid;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public List<Role> getRoleList() {
        return roleList;
    }

    public void setRoleList(List<Role> roleList) {
        this.roleList = roleList;
    }

    public List<Files> getFilesList() {
        return filesList;
    }

    public void setFilesList(List<Files> filesList) {
        this.filesList = filesList;
    }

    @Override
    public String toString() {
        return "User{" +
                "uid=" + uid +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", email='" + email + '\'' +
                ", roleList=" + roleList +
                ", filesList=" + filesList +
                '}';
    }
}


